-- GENERATED SPELL FOR [Murkblood Oracle] --


function spell0_17771(pUnit, Event) --@Amplify Damage,n/a--
pUnit:FullCastSpellOnTarget(12248,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 12000, 1)
end

function spell1_17771(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(31405,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 26000, 1)
end

function spell2_17771(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(37113,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 26000, 1)
end

function spell3_17771(pUnit, Event) --@Elemental Armor,Self--
pUnit:FullCastSpellOnTarget(34880,pUnit)
pUnit:RegisterEvent('Sorts_17771', 0, 1)
end

function spell4_17771(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(14034,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 3000, 1)
end

function spell5_17771(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 3000, 1)
end

function spell6_17771(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15531,pUnit)
pUnit:RegisterEvent('Sorts_17771', 8319, 1)
end

function spell7_17771(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(32192,pUnit)
pUnit:RegisterEvent('Sorts_17771', 5314, 1)
end

function spell8_17771(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(12675,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 7000, 1)
end

function spell9_17771(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15497,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 7000, 1)
end

function spell10_17771(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(15241,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 1500, 1)
end

function spell11_17771(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(36807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 1500, 1)
end

function spell12_17771(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 3000, 1)
end

function spell13_17771(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17771', 3000, 1)
end

function Sorts_17771(pUnit, Event)
local choix_sorts_17771 = math.random(0, 13)
if choix_sorts_17771 == 0 then
pUnit:RegisterEvent('spell0_17771', 1, 1)
end
if choix_sorts_17771 == 1 then
pUnit:RegisterEvent('spell1_17771', 1, 1)
end
if choix_sorts_17771 == 2 then
pUnit:RegisterEvent('spell2_17771', 1, 1)
end
if choix_sorts_17771 == 3 then
pUnit:RegisterEvent('spell3_17771', 1, 1)
end
if choix_sorts_17771 == 4 then
pUnit:RegisterEvent('spell4_17771', 1, 1)
end
if choix_sorts_17771 == 5 then
pUnit:RegisterEvent('spell5_17771', 1, 1)
end
if choix_sorts_17771 == 6 then
pUnit:RegisterEvent('spell6_17771', 1, 1)
end
if choix_sorts_17771 == 7 then
pUnit:RegisterEvent('spell7_17771', 1, 1)
end
if choix_sorts_17771 == 8 then
pUnit:RegisterEvent('spell8_17771', 1, 1)
end
if choix_sorts_17771 == 9 then
pUnit:RegisterEvent('spell9_17771', 1, 1)
end
if choix_sorts_17771 == 10 then
pUnit:RegisterEvent('spell10_17771', 1, 1)
end
if choix_sorts_17771 == 11 then
pUnit:RegisterEvent('spell11_17771', 1, 1)
end
if choix_sorts_17771 == 12 then
pUnit:RegisterEvent('spell12_17771', 1, 1)
end
if choix_sorts_17771 == 13 then
pUnit:RegisterEvent('spell13_17771', 1, 1)
end
end

function mob17771_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17771', math.random(1500, 3000), 1)
end

function mob17771_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17771_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17771_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17771, 1, 'mob17771_Action')
RegisterUnitEvent(17771, 2, 'mob17771_Leave')
RegisterUnitEvent(17771, 3, 'mob17771_Kill')
RegisterUnitEvent(17771, 4, 'mob17771_Die')
